package org.zbclan.bf2.rcon.client;

import org.timepedia.exporter.client.Export;
import org.timepedia.exporter.client.ExportPackage;
import org.timepedia.exporter.client.Exportable;

import com.google.gwt.core.client.JavaScriptObject;

@Export
@ExportPackage("bf2rcon")
public class JSHello extends Hello implements Exportable {

	public JSHello() {
	}

	public JSHello(JavaScriptObject properties) {

		if (properties != null) {
			JsProperties jsProperties = new JsProperties(properties);
			String text = jsProperties.get("text");
			setText(text);
		}

		return;
	}

	@Override
	public void setText(String text) {
		super.setText(text);
	}

	@Override
	public String getText() {
		return super.getText();
	}

	public void callback(JsClosure f) {
		f.execute("call", "back");
	}
}
